<template>
  <!-- 客户管理模块-客户信息详情(公司)页面 -->
  <div class="fillcontain baseInfo">
    <!-- 标题 -->
    <div class="fastQuery">
      <el-row>
        <el-col :span="6" class="fastQuery_title">
          <i class="el-icon-tickets"></i><span> 客户信息详情</span></el-col>
        <el-col :span="8"></el-col>
      </el-row>
    </div>
    <div class="contain">
      <el-form label-width="120px" class="search_container">
        <el-row class="common-box">
          <el-col :span="8">
            <el-col :span="8" class="common-lab">
              <label class="customerType">客户类别</label>
            </el-col>
            <el-col :span="16">
              <el-select clearable :disabled="customerDetail.customerType != '' " v-model="customerDetail.customerType">
                <el-option v-for="customerty in customertype" :key="customerty.value" :label="customerty.label" :value="customerty.value">
                </el-option>
              </el-select>
            </el-col>
          </el-col>
          <el-col :span="8">
            <el-col :span="8" class="common-lab">
              <label class="idType">证件类型</label>
            </el-col>
            <el-col :span="16">
              <el-select :disabled="customerDetail.idType != '' " v-model="customerDetail.idType">
                <el-option v-for="idtype in idType" :key="idtype.value" :label="idtype.label" :value="idtype.value">
                </el-option>
              </el-select>
            </el-col>
          </el-col>
          <el-col :span="8">
            <el-col :span="8" class="common-lab">
              <label class="labelName">统一编码</label>
            </el-col>
            <el-col :span="16">
              <el-input readonly placeholder=""></el-input>
            </el-col>
          </el-col>
        </el-row>
        <el-row class="common-box">
          <el-col :span="8">
            <el-col :span="8" class="common-lab">
              <label class="customerName">姓名</label>
            </el-col>
            <el-col :span="16">
              <el-input readonly placeholder="姓名" v-model="customerDetail.customerName"></el-input>
            </el-col>
          </el-col>
          <el-col :span="8">
            <el-col :span="8" class="common-lab">
              <label class="validityType">有效类型</label>
            </el-col>
            <el-col :span="16">
              <el-select :disabled="customerDetail.validityType != '' " v-model="customerDetail.validityType">
                <el-option v-for="valType in validityType" :key="valType.value" :label="valType.label" :value="valType.value">
                </el-option>
              </el-select>
            </el-col>
          </el-col>
          <el-col :span="8">
            <el-col :span="8" class="common-lab">
              <label class="validityDate">有效期截止日</label>
            </el-col>
            <el-col :span="16">
              <el-input readonly placeholder="有效期截止日" v-model="customerDetail.validityDate"></el-input>
            </el-col>
          </el-col>
        </el-row>
        <el-row class="common-box">
          <el-col :span="8">
            <el-col :span="8" class="common-lab">
              <label class="nationality">国籍/地区</label>
            </el-col>
            <el-col :span="16">
              <el-input readonly placeholder="" v-model="customerDetail.nationality"></el-input>
            </el-col>
          </el-col>
          <el-col :span="8">
            <el-col :span="8" class="common-lab">
              <label class="mobilePhoneOne">移动电话1</label>
            </el-col>
            <el-col :span="16">
              <el-input readonly placeholder="" v-model="customerDetail.mobilePhoneOne"></el-input>
            </el-col>
          </el-col>
          <el-col :span="8">
            <el-col :span="8" class="common-lab">
              <label class="mobilePhoneTwo">移动电话2</label>
            </el-col>
            <el-col :span="16">
              <el-input readonly placeholder="" v-model="customerDetail.mobilePhoneTwo"></el-input>
            </el-col>
          </el-col>
        </el-row>
        <el-row class="common-box">
          <el-col :span="8">
            <el-col :span="8" class="common-lab">
              <label class="fixedTelephone">固定电话</label>
            </el-col>
            <el-col :span="16">
              <el-input readonly placeholder="" v-model="customerDetail.fixedTelephone"></el-input>
            </el-col>
          </el-col>
          <el-col :span="8">
            <el-col :span="8" class="common-lab">
              <label class="labelName">传值机号码</label>
            </el-col>
            <el-col :span="16">
              <el-input readonly placeholder=""></el-input>
            </el-col>
          </el-col>
          <el-col :span="8">
            <el-col :span="8" class="common-lab">
              <label class="rdidtelno">其他电话</label>
            </el-col>
            <el-col :span="16">
              <el-input readonly placeholder="" v-model="customerDetail.rdidtelno"></el-input>
            </el-col>
          </el-col>
        </el-row>
        <el-row class="common-box">
          <el-col :span="8">
            <el-col :span="8" class="common-lab">
              <label class="occpCode">职业信息</label>
            </el-col>
            <el-col :span="16">
              <el-input readonly placeholder="" v-model="customerDetail.occpCode"></el-input>
            </el-col>
          </el-col>
          <el-col :span="8">
            <el-col :span="8" class="common-lab">
              <label class="professionalLevel">职业等级</label>
            </el-col>
            <el-col :span="16">
              <el-input readonly placeholder="" v-model="customerDetail.professionalLevel"></el-input>
            </el-col>
          </el-col>
          <el-col :span="8">
            <el-col :span="8" class="common-lab">
              <label class="unitType">单位性质</label>
            </el-col>
            <el-col :span="16">
              <el-select :disabled="customerDetail.unitType != '' " v-model="customerDetail.unitType">
                <el-option v-for="unittype in unittype" :key="unittype.value" :label="unittype.label" :value="unittype.value">
                </el-option>
              </el-select>
            </el-col>
          </el-col>
        </el-row>
        <el-row class="common-box">
          <el-col :span="8">
            <el-col :span="8" class="common-lab">
              <label class="cltpcode">邮编区号</label>
            </el-col>
            <el-col :span="16">
              <el-input readonly placeholder="" v-model="customerDetail.cltpcode"></el-input>
            </el-col>
          </el-col>
          <el-col :span="8">
            <el-col :span="8" class="common-lab">
              <label class="riskLevel">风险等级</label>
            </el-col>
            <el-col :span="16">
              <el-input readonly placeholder="" v-model="customerDetail.riskLevel"></el-input>
            </el-col>
          </el-col>
          <el-col :span="8">
            <el-col :span="8" class="common-lab">
              <label class="email">E-mail</label>
            </el-col>
            <el-col :span="16">
              <el-input readonly placeholder="" v-model="customerDetail.email"></el-input>
            </el-col>
          </el-col>
        </el-row>
        <el-row class="common-box">
          <el-col :span="8">
            <el-col :span="8" class="common-lab">
              <label class="shippingMethod">信函寄送方式</label>
            </el-col>
            <el-col :span="16">
              <el-input readonly placeholder="" v-model="customerDetail.shippingMethod"></el-input>
            </el-col>
          </el-col>
          <el-col :span="16">
            <el-col :span="4" class="common-lab">
              <label class="postalAddress">收费地址</label>
            </el-col>
            <el-col :span="20">
              <el-input readonly placeholder="" v-model="customerDetail.postalAddress"></el-input>
            </el-col>
          </el-col>
        </el-row>
        <el-row class="mt20">
          <el-col :span="24" class="text_center pr20">
            <el-button type="danger" class="Defaultbutton" @click="getIndividualTax()">个人税收居民身份声明文件</el-button>
            <el-button type="danger" v-if="customerDetail.customerType == 'C'" class="Defaultbutton" @click="skipTrustManageDialog()">信托信息管理</el-button>
            <el-button type="danger" v-if="unitType=='E'" class="Defaultbutton" @click="skipCopartnerManageDialog()">股东合伙人信息管理</el-button>
            <el-button type="danger" v-if="unitType=='F'" class="Defaultbutton" @click="skipStockDialog()">股权/表决权信息管理</el-button>
            <el-button type="danger" @click="back">返回</el-button>
          </el-col>
        </el-row>
      </el-form>
    </div>


    <!--弹框  信托信息管理 -->
    <el-dialog title="信托信息管理" :visible.sync="trustManageDialog" width="50%" center>
      <el-form ref="form" :model="form" label-width="120px">
        <el-row>
          <el-col :span="24">
            <div class="title">
              <span>信托投保人</span>
            </div>
            <el-row>
              <el-col :span="12">
                <el-form-item label="单位名称">
                  <el-input disabled v-model="cltrp.lsurname"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="证件类型">
                  <el-select  disabled v-model="cltrp.cltind" placeholder="">
                    <el-option value="" label=""></el-option>
                    <el-option value="L" label="企业法人营业执照"></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="证件号码">
                  <el-input disabled v-model="cltrp.secuityno"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="有效期类型">
                  <el-select  disabled v-model="cltrp.rinternet" placeholder="">
                    <el-option value="3" label="缺省"></el-option>
                    <el-option value="" selected="selected"></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="有效期截止日">
                  <!--<el-date-picker disabled v-model="cltrp.cltdod" value-format="yyyyMMdd" :picker-options="pickerOptions1" type="date" placeholder="选择日期">
                  </el-date-picker>-->
                  <el-input disabled v-model.trim="cltrp.cltdod"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="联系地址">
                  <el-input disabled v-model="cltrp.cmntdesc"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
          </el-col>
          <el-col :span="24" class="mt20">
            <div class="title">
              <span>法定代表人/主要负责人</span>
            </div>
            <el-row>
              <el-col :span="12">
                <el-form-item label="姓名">
                  <el-input disabled v-model="cltrl.lsurname"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="证件类型">
                  <el-select clearable disabled v-model="cltrl.cltind" placeholder="">
                    <el-option v-for="item in idType" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="证件号码">
                  <el-input disabled v-model="cltrl.secuityno"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="职务">
                  <el-select clearable disabled v-model="cltrl.role" placeholder="">
                    <el-option value=""></el-option>
                    <el-option value="L" label="法定代表人"></el-option>
                    <el-option value="M" label="主要负责人"></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="有效期类型">
                  <el-select clearable disabled v-model="cltrl.rinternet" placeholder="">
                    <el-option value="0" label=""></el-option>
                    <el-option value="1" label="终身"></el-option>
                    <el-option value="2" label="年期"></el-option>
                    <el-option value="3" label="缺省"></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="有效期截止日">
                  <!--<el-date-picker disabled v-model="cltrl.cltdod" value-format="yyyyMMdd" :picker-options="pickerOptions1" type="date" placeholder="选择日期">
                  </el-date-picker>-->
                  <el-input clearable v-model.trim="cltrl.cltdod"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="国家/地区">
                  <el-select clearable disabled v-model="cltrl.natlty" placeholder="">
                    <el-option v-for="item in area" :key="item.nationab" :label="item.nationabcd" :value="item.nationab">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="是否黑名单">
                  <el-select clearable disabled v-model="cltrl.blacklist" placeholder="">
                    <el-option value="" label=""></el-option>
                    <el-option value="Y" label="是"></el-option>
                    <el-option value="N" label="否"></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="联系地址">
                  <el-input disabled v-model="cltrl.cmntdesc"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
          </el-col>
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button type="danger" class="dangerbutton" @click="trustManageDialog = false">返 回</el-button>
      </span>
    </el-dialog>

    <!--弹框  股东合伙人信息管理 -->
    <el-dialog title="股东合伙人信息管理" :visible.sync="copartnerManageDialog" width="50%" center>
      <el-form ref="form" label-width="120px">
        <el-row>
          <el-col :span="24">
            <div v-for="(copartnerInfo,index) in copartner">
              <div class="title">
                <span>所有人{{index+1}}</span>
              </div>
              <el-row>
                <el-col :span="12">
                  <el-form-item label="姓名">
                    <el-input disabled v-model="copartnerInfo.lsurname"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="证件类型">
                    <el-select  disabled v-model="copartnerInfo.cltind" placeholder="">
                      <el-option v-for="item in idType" :key="item.value" :label="item.label" :value="item.value">
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="国家/地区">
                    <el-select disabled v-model="copartnerInfo.natlty" placeholder="">
                      <el-option v-for="item in area" :key="item.nationab" :label="item.nationabcd" :value="item.nationab">
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="证件号码">
                    <el-input disabled v-model="copartnerInfo.secuityno"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="有效期类型">
                    <el-select  disabled v-model="copartnerInfo.rinternet" placeholder="">
                      <el-option value="0" label=""></el-option>
                      <el-option value="1" label="终身"></el-option>
                      <el-option value="2" label="年期"></el-option>
                      <el-option value="3" label="缺省"></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="有效期截止日">
                    <!--<el-date-picker disabled v-model="copartnerInfo.cltdod" value-format="yyyyMMdd" :picker-options="pickerOptions1" type="date"
                      placeholder="选择日期">
                    </el-date-picker>-->
                    <el-input disabled v-model="copartnerInfo.cltdod"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="合伙权益比例">
                    <el-input disabled v-model="copartnerInfo.paypct01"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="是否黑名单">
                    <el-select disabled v-model="copartnerInfo.blacklist" placeholder="">
                      <el-option value=""></el-option>
                      <el-option value="Y" label="是"></el-option>
                      <el-option value="N" label="否"></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="联系地址">
                    <el-input disabled v-model="copartnerInfo.cmntdesc"></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
            </div>
          </el-col>
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button type="danger" class="dangerbutton" @click="copartnerManageDialog = false">返 回</el-button>
      </span>
    </el-dialog>

    <!--弹框  股权/表决权信息管理 -->
    <el-dialog title="股权/表决权信息管理" :visible.sync="stockDialog" width="50%" center>
      <el-form ref="form" :model="shcltr" label-width="120px">
        <el-row>
          <el-col :span="24">
            <div class="title">
              <span>其他实际控制公司或企业所有人</span>
            </div>
            <el-row>
              <el-col :span="12">
                <el-form-item label="姓名">
                  <el-input disabled v-model="shcltr.lsurname"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="证件类型">
                  <el-select  disabled v-model="shcltr.cltind" placeholder="">
                    <el-option v-for="item in idType" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="证件号码">
                  <el-input disabled v-model="shcltr.secuityno"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="国家/地区">
                  <el-select  disabled v-model="shcltr.natlty" placeholder="">
                    <el-option v-for="item in area" :key="item.nationab" :label="item.nationabcd" :value="item.nationab">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="有效期类型">
                  <el-select  disabled v-model="shcltr.rinternet" placeholder="">
                    <el-option value="0" label=""></el-option>
                    <el-option value="1" label="终身"></el-option>
                    <el-option value="2" label="年期"></el-option>
                    <el-option value="3" label="缺省"></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="有效期截止日">
                  <!--<el-date-picker disabled v-model="shcltr.cltdod" value-format="yyyyMMdd" :picker-options="pickerOptions1" type="date" placeholder="选择日期">
                  </el-date-picker>-->
                  <el-input disabled v-model="shcltr.cltdod"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="是否黑名单">
                  <el-select disabled v-model="shcltr.blacklist" placeholder="">
                    <el-option value="Y" label="是"></el-option>
                    <el-option value="N" label="否"></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="联系地址">
                  <el-input disabled v-model="shcltr.cmntdesc"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="控制方式">
                  <el-radio-group disabled v-model="shcltr.conttyp">
                    <p class="pt10">
                      <el-radio :label="1">有权决定公司或者企业的人事任免，并可据以从其经营活动中获取利益</el-radio>
                    </p>
                    <p class="pt10">
                      <el-radio :label="2">有权决定公司或者企业的财务事项，并可据以从其经营活动中获取利益</el-radio>
                    </p>
                    <p class="pt10">
                      <el-radio :label="3">有权决定公司或者企业的经营决策，并可据以从其经营活动中获取利益</el-radio>
                    </p>
                  </el-radio-group>
                </el-form-item>
              </el-col>
            </el-row>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="24">
            <div class="title">
              <span>直接或简介拥有股权或表决权者</span>
            </div>
            <div v-for="(shcltrInfo,index) in shcltrList">
              <div class="">
                <span>所有人{{index+1}}</span>
              </div>
              <el-row>
                <el-col :span="12">
                  <el-form-item label="姓名">
                    <el-input disabled v-model="shcltrInfo.lsurname"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="证件类型">
                    <el-select  disabled v-model="shcltrInfo.cltind" placeholder="">
                      <el-option v-for="item in idType" :key="item.value" :label="item.label" :value="item.value">
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="证件号码">
                    <el-input disabled v-model="shcltrInfo.secuityno"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="国家/地区">
                    <el-select  disabled v-model="shcltrInfo.natlty" placeholder="">
                      <el-option v-for="item in area" :key="item.nationab" :label="item.nationabcd" :value="item.nationab">
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="有效期类型">
                    <el-select  disabled v-model="shcltrInfo.rinternet" placeholder="">
                      <el-option value="1" label="终身"></el-option>
                      <el-option value="2" label="年期"></el-option>
                      <el-option value="3" label="缺省"></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="有效期截止日">
                    <!--<el-date-picker disabled v-model="shcltrInfo.cltdod" value-format="yyyyMMdd" :picker-options="pickerOptions1" type="date"
                      placeholder="选择日期">
                    </el-date-picker>-->
                    <el-input disabled v-model="shcltrInfo.cltdod"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="持股比例">
                    <el-input disabled v-model="shcltrInfo.paypct02"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="表决权比例">
                    <el-input disabled v-model="shcltrInfo.paypct03"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="是否黑名单">
                    <el-select disabled v-model="shcltrInfo.blacklist" placeholder="">
                      <el-option value="Y" label="是"></el-option>
                      <el-option value="N" label="否"></el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="联系地址">
                    <el-input disabled v-model="shcltrInfo.cmntdesc"></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
            </div>
          </el-col>
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button type="danger" class="dangerbutton" @click="stockDialog = false">返 回</el-button>
      </span>
    </el-dialog>


  </div>
</template>
<script>
  import constant from '@/utils/constant';
  import { mapState, mapGetters } from 'vuex'
  import manageConstants from '@/utils/manageConstants';
  import { getCustomerInfoDetail, trustManage,getNationList } from "@/api/customermanage/customerManage.js";
  export default {
    data() {
      return {

        trustManageDialog: false,//默认隐藏 信托信息管理弹框
        copartnerManageDialog: false,//默认隐藏 股东合伙人信息管理弹框
        stockDialog: false,//默认隐藏股权/表决权信息管理弹框
        customerDetail: [],
        shcltr: {},
        copartner: [{}],
        shcltrList: [{}],
        cltrp: {},
        cltrl: {},
        area: [],
        options: manageConstants.options,
        customertype: manageConstants.customerType,
        idType: manageConstants.idType,
        validityType: manageConstants.validityType,
        marrydType: manageConstants.marrydType,
        customerNo: '',
        unittype: manageConstants.unittype,
        unitType: '',
        form: {
          compnyname: ''
        },
        pickerOptions1: {
          disabledDate(time) {
            return time.getTime() > Date.now();
          }
        },
      }
    },
    activated() {
      //页面初始化方法
      this.getCustomerCompanyInfo();
      this.initNation();
    },
    mounted() { //页面初始化方法
      // this.customerNo = this.$route.query.customerNo;
      // this.getCustomerCompanyInfo();
    },
    methods: {
      initNation() {
        getNationList().then(res => {
          if (res.resultCode == constant.SUCCESS && res.data.length > 0) {
            this.area = res.data;
          }
        }).catch(err => {
          this.$emit('checkData', false)
        })
      },
      //查客户(公司)详情
      getCustomerCompanyInfo() {
        this.customerNo = this.$route.query.customerNo;
        this.$store.dispatch('loading/CHNAGE_SUBLOADING', true)
        let params = {
          customerNo: this.customerNo
        }
        getCustomerInfoDetail(params).then(res => {
          this.$store.dispatch('loading/CHNAGE_SUBLOADING', false)
          if (res.resultCode == constant.SUCCESS && res.data) {
            this.customerDetail = res.data;
            this.unitType = res.data.unitType;
          }
          this.$emit('checkData', this.tableData.length > 0 ? true : false)
        }).catch(err => {
          this.$emit('checkData', false)
          this.$store.dispatch('loading/CHNAGE_SUBLOADING', false)
        })
      },
      //信托信息管理
      skipTrustManageDialog() {
        this.trustManageDialog = true;
        let params = {
          "clntnum": this.customerNo,
          "type": "trust",
        }
        trustManage(params).then(res => {
          if (res.resultCode == constant.SUCCESS) {
            if (res.data.cltrp) {
              this.cltrp = res.data.cltrp;
            }
            if (res.data.cltrl) {
              this.cltrl = res.data.cltrl;
            }
          }
          this.$emit('checkData', this.tableData.length > 0 ? true : false)
        }).catch(err => {
          this.$emit('checkData', false)
        })

      },
      //股东/合伙人信息管理
      skipCopartnerManageDialog() {
        this.copartnerManageDialog = true;
        let params = {
          "clntnum": this.customerNo,
          "type": "copartner",
        }
        trustManage(params).then(res => {
          console.log(res);
          if (res.resultCode == constant.SUCCESS && res.data.copartner) {
            if (res.data.copartner.length > 0) {
              this.copartner = res.data.copartner;
            }
            this.popMsg("获取股东/合伙人信息成功", "error");
          }
        }).catch(err => {
          this.$emit('checkData', false)
        })
      },
      //股权/表决权信息管理
      skipStockDialog() {
        this.stockDialog = true;
        let params = {
          "clntnum": this.customerNo,
          "type": "stock",
        }
        trustManage(params).then(res => {
          if (res.resultCode == constant.SUCCESS && (res.data.shcltr || res.data.shcltrList.length > 0)) {
            this.shcltr = res.data.shcltr;
            this.shcltrList = res.data.shcltrList;
            this.popMsg("获取股权/表决权信息", "error");
          }
        }).catch(err => {
          this.$emit('checkData', false)
        })
      },
      getIndividualTax() {
        this.$router.push({
          path: "/customer/customerTaxFile", query: {
            clntnum: this.customerNo,
            reload: true
          }
        })

      },
      back() {
        this.$router.go(-1);//返回上一层
      },
    },
    watch: {
      "$route": {
        handler(route) {
          if (route.query.customerNo != undefined && route.query.customerNo != this.customerNo) {
            this.getCustomerCompanyInfo();
          }
        }
      }
    }
  }

</script>

<style lang="less" scoped>
  .fillcontain {
    padding-bottom: 0;

    .fastQuery {
      padding: 15px 20px 10px 20px;
      background: #fff;
      border-bottom: 1px solid #e1e1e1;

      .fastQuery_title {
        color: #666;
        padding: 6px 0px;
      }
    }
  }

  .contain {
    background: #fff;
    padding: 10px;
    margin-bottom: 20px;
  }

  .common-box {
    padding-bottom: 15px;
  }

  .common-lab {
    line-height: normal!important;
    text-align: right;
    .labelName {
      text-align: right;
    }
  }
</style>